<template>
  <div class="banner-item" @click="goodsDetail" :style="styleData">
    <img v-lazy='item.img' alt="">
  </div>
</template>
<script>
export default {
  props: ["parentData", "styleData"],
  data() {
    return {
      item: {},
      lazyPic: require("../../assets/img/publicImg/loading_default.png")
    };
  },
  created() {
    this.item = this.parentData;
  },
  methods: {
    goodsDetail() {
      this.$emit("childEvent", this.item);
    }
  }
};
</script>

<style lang="less" scoped>
.banner-item{
  width: 6.35rem;
  height: 2.6rem;
  overflow: hidden;
}
</style>